package com.wangshouyu.mp.offiaccount;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月07日 13:29
 * @description 客服信息
 */
public class AccountInfo implements Serializable {

    /**
     * id
     */
    @SerializedName(value = "kf_id")
    @JsonProperty(value = "kf_id")
    @JSONField(name = "kf_id")
    private String id;

    /**
     * 客服账号
     */
    @SerializedName(value = "kf_account")
    @JsonProperty(value = "kf_account")
    @JSONField(name = "kf_account")
    private String account;

    /**
     * 客服昵称
     */
    @SerializedName(value = "kf_nick")
    @JsonProperty(value = "kf_nick")
    @JSONField(name = "kf_nick")
    private String nickName;

    /**
     * 头像地址
     */
    @SerializedName(value = "kf_headimgurl")
    @JsonProperty(value = "kf_headimgurl")
    @JSONField(name = "kf_headimgurl")
    private String headImageUrl;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getHeadImageUrl() {
        return headImageUrl;
    }

    public void setHeadImageUrl(String headImageUrl) {
        this.headImageUrl = headImageUrl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AccountInfo that = (AccountInfo) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(account, that.account) &&
                Objects.equals(nickName, that.nickName) &&
                Objects.equals(headImageUrl, that.headImageUrl);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, account, nickName, headImageUrl);
    }

    @Override
    public String toString() {
        return "AccountInfo{" +
                "id='" + id + '\'' +
                ", account='" + account + '\'' +
                ", nickName='" + nickName + '\'' +
                ", headImageUrl='" + headImageUrl + '\'' +
                '}';
    }
}
